package com.ty.day5;

/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/20 10:26
 */
public class One {
    public static void main(String[] args) {
        User user = new User("唐宇","123");
        User.print(user);
        User user1 = new User();
        user=user1;
        User.print(user);
        System.out.println(user.uname+user.pwd);
    }
}
class User{
    String uname;
    String pwd;
    public User() {
    }
    public User(String uname, String pwd) {
        this.uname = uname;
        this.pwd = pwd;
    }
    public static void print(User user){
        user.pwd = "123456";
        System.out.println(user.uname +"----" + user.pwd);
    }
}